package com.yqd.lesson.actor.three

import akka.actor.{ActorRef, ActorSystem, PoisonPill}

/*
  Actor 监管下级子actor
 */
object Main extends App{

  //用户创建的顶级actor的监管者
  val system: ActorSystem = ActorSystem("helloAkka")

  val supervision: ActorRef = system.actorOf(Sender.props, "supervision")

  supervision ! "tom"
  Thread.sleep(2000)
  supervision ! 0

  system.terminate();
}
